import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { BaseService } from '../base/base.service';

@Injectable({
  providedIn: 'root'
})
export class HomeService {

  constructor (private readonly baseService: BaseService) { }
  // 获取全部的分类
  public category$(): Observable<any> {
    return this.baseService.get('/front/category');
  }

  // 获取主页分类商品
  public goodsCategoryList$(): Observable<any> {
    return this.baseService.get('/front/goods')
  }
}
